import api from "../utils/request";

export function login(loginVo) {
  return api.post("/api/api/sys/user/login", loginVo);
}

export function register(register) {
  return api.post("/api/api/sys/user/register", register);
}

export function getCode() {
  return api.get("/api/api/sys/user/getCode");
}

export function loginByToken(type) {
  return api.get("/api/api/sys/user/login/token", {
    params: {
      type: type,
    },
  });
}

export function giteeUrl(type) {
  return api.get("/api/api/sys/user/gitee/url", {
    params: {
      type: type,
    },
  });
}

export function loginOut() {
  return api.get("/api/api/sys/user/login/out");
}
